<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <meta name="author" content="MxsDoc" />
    <!--  link rel="shortcut icon" href="https://wiki.iminho.me/favicon.ico"-->
    <link rel="shortcut icon" href="static/SmartWiki/favicon.ico">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0">
    <title>首页-MxsDoc</title>    
    
    <meta name="keywords" content="mxsdoc,Web文件系统,网页文件系统">
   	<meta name="description" content="MxsDoc是一个开源、免费的web文件管理系统，为个人和企业用户提供便捷高效的文件存储和文件管理服务！" />
	
	<link href="css/logo/logo.css" rel="stylesheet">
	<link href="static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="static/styles/frontpage.css" rel="stylesheet">
    <link href="static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="static/swiper/swiper.min.css" rel="stylesheet">
    <script src="static/scripts/jquery.min.js"></script>
    <script type="text/javascript" src="js/common.js"></script>

    <style type="text/css">
        .swiper-container {
            width: 100%;
            margin-bottom: 20px;

        }
        .swiper-slide {
            text-align: center;
            font-size: 18px;
            background: #fff;

            /* Center slide text vertically */
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
        }

        .swiper-slide>img{
            width: 100%;
        }
    </style>
</head>

<body>
<div class="header">
    <div class="container">
        <a class="navbar-brand" href="/DocSystem">
        	<i class="logo default"></i> 
        	MxsDoc
        </a>
                <div class="btn-group dropdown-menu-right pull-right slidebar visible-xs-inline-block">
                    <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><i class="fa fa-align-justify"></i></button>
                    <ul class="dropdown-menu" role="menu">
						<li id="mobileLoginBtn">
                            <a onclick="showLoginPanel()" title="用户登录">登录</a>
                        </li>
                        <li id="mobileLogoutBtn">
                        	<a onclick="userLogout()" title="用户登录">退出</a>
                        </li>
                        <li id="mobileRegisterBtn">
                            <a onclick="showRegisterPanel()" title="用户注册">注册</a>
                        </li>
                        <li id="mobileEnterSystemBtn">
                            <a href="projects.html" title="进入系统">进入系统</a>
                        </li>
                        
                    </ul>
                </div>    
		<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">	
            <ul class="nav navbar-nav navbar-right">
				<li id="userImgDiv" style="display:none"><img id="userImg" name="userImg" width="40px" height="40px" src="images/default/defaultHeadPic.png" onerror="UserImgErrHandler();" class="img-circle m5"/></li>
				<li id="userInfoDiv" style="display:none">
							<a href="" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span>Rainy</span><span class="caret"></span></a>
							<ul class="dropdown-menu" role="menu">
								<li><a href="/DocSystem/web/myHostPage.html">个人中心</a></li>
								<li><a href="/DocSystem/web/shareManager.html">我的分享</a></li>
								<li><a href="/DocSystem/web/reposManager.html">仓库管理</a></li>
								<li id="logoutBtn"><a onclick="userLogout()">退出登录</a></li>
							</ul>
				</li>
				<li id="loginBtn">
                    <a onclick="showLoginPanel();">登录</a>
                </li>
                <li id="registerBtn">
                    <a onclick="showRegisterPanel();">注册</a>
                </li>
                <li>
                    <a target="_blank" href="http://dw.gofreeteam.com">官网</a>
                </li>
                <li id="enterSystemLink"  style="display:none">
                    <a href="projects.html">进入系统>></a>
                </li>
                <li style="list-style: none; display: inline">
                    <div class="clear"></div>
                </li>
            </ul>
        </nav>
    </div>
</div>

<!-- Swiper -->
<div class="swiper-container" style="max-height:500px">
    <div class="swiper-wrapper">
        <div class="swiper-slide">
			<div class="banner text-center">
			    <div class="container">
			        <div class="banner-info">
			            <h1>文件管理系统</h1>
			            <p>简单、方便就够了</p>
			            <a id="loginBannerBtn" class="banner_btn"  onclick="showLoginPanel();">登录</a>
			            <a id="enterSystemBtn" class="banner_btn"  href="projects.html" style="display:none">进入系统</a>
			        </div>
			    </div>
			</div>
		</div>
        <div class="swiper-slide" onclick="Banner.onclick(1);">
        	<div id="banner1" class="banner text-center" style="background-image: url(/DocSystem/web/images/local_banner/1.jpg)"></div>
        </div>
        <div class="swiper-slide"  onclick="Banner.onclick(2);" >
        	<div id="banner2" class="banner text-center" style="background-image: url(/DocSystem/web/images/local_banner/2.jpg)"></div>
        </div>
        <div class="swiper-slide" onclick="Banner.onclick(3);">
        	<div id="banner3" class="banner text-center" style="background-image: url(/DocSystem/web/images/local_banner/3.jpg)"></div>
        </div>
        <div class="swiper-slide" onclick="Banner.onclick(4);">
        	<div id="banner4" class="banner text-center" style="background-image: url(/DocSystem/web/images/local_banner/4.jpg)"></div>
        </div>
        <div class="swiper-slide" onclick="Banner.onclick(5);">
        	<div id="banner5" class="banner text-center" style="background-image: url(/DocSystem/web/images/local_banner/5.jpg)"></div>
        </div>
        <div class="swiper-slide" onclick="Banner.onclick(6);" >
        	<div id="banner6" class="banner text-center" style="background-image: url(/DocSystem/web/images/local_banner/6.jpg)"></div>
        </div>
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
    <!-- Add Arrows -->
    <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div>
</div>

<div class="main">
    <div class="content_white">
        <h2>系统简介</h2>
        <p>MxsDoc是基于Web的文件管理系统，主要用于企业或个人的文件存储管理，方便随时查看和统一管理。</p>
    </div>


    <div class="featured_content" id="feature">
        <div class="container">
            <div class="row text-center">
                <div class="col-mg-3 col-xs-3 feature_grid1">
                    <i class="fa fa-bookmark fa-3x"></i>
                    <h3 class="m_1"><a href="#">操作简单</a></h3>

                    <p class="m_2">本地化操作习惯：查看、编辑、复制、粘贴、新建、删除、拖拽移动。</p>
                </div>

                <div class="col-md-3 col-xs-3 feature_grid1">
                    <i class="fa fa-cog fa-3x"></i>
                    <h3 class="m_1"><a href="#">使用方便</a></h3>
                    <p class="m_2">电脑手机自适应设计：随时随地，想看就看，想改就改。</p>
                </div>

                <div class="col-mg-3 col-xs-3 feature_grid1">
                    <i class="fa fa-paper-plane-o fa-3x"></i>
                    <h3 class="m_1"><a href="#">安全高效</a></h3>
                    <p class="m_2">支持增量版本控制、集中式权限管理，支持在线编辑和文件备注，安全且高效。</p>
                </div>


                <div class="col-md-3 col-xs-3 feature_grid2">
                    <i class="fa fa-leaf fa-3x"></i>
                    <h3 class="m_1"><a href="#">代码开源</a></h3>
                    <p class="m_2">GPL2.0开源协议：支持系统二次开发和功能定制。</p>
                </div>
            </div>
        </div>
    </div>

    <div class="about-info">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <div class="block-heading-two">
                        <h2><span>MxsDoc MxsDoc</span></h2>
                    </div>
                    <p>构建一个属于自己的文件存储系统。</p>
                    <p><a class="banner_btn" onclick="showFeebackPanel()">意见与反馈</a>
                    </p>
                </div>


                <div class="col-md-4">
                    <div class="block-heading-two">
                        <h3><span>目标</span>
                        </h3>
                    </div>

                    <div class="panel-group" id="accordion-alt3">
                        <div class="panel">
                            <div class="panel-heading">
                                <h4 class="panel-title">更简单</h4>
                            </div>
                        </div>


                        <div class="panel">
                            <div class="panel-heading">
                                <h4 class="panel-title">更方便
                                </h4>
                            </div>
                        </div>


                        <div class="panel">
                            <div class="panel-heading">
                                <h4 class="panel-title">更安全</h4>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="highlight-info">
        <div class="overlay spacer">
            <div class="container">
                <div class="row text-center">
	                MxsDoc V2.02.53
	                <a id="downloadPackageBtn" class="banner_btn"  onclick="downloadInstallPackage();">下载</a>
	                <a id="purchaseLicenseBtn" class="banner_btn"  onclick="purchaseLicense();">购买</a>
                </div>
            </div>
        </div>
    </div>

    <div class="footer">
        <div class="footer_bottom">
            <div class="follow-us">
                <a class="fa fa-github social-icon" href="#"></a>
                <a class="fa fa-weibo social-icon" href="#"></a>
                <a class="fa fa-weixin social-icon" href="#"></a>
                <a class="fa fa-qq social-icon" href="#"></a>
            </div>


            <div class="copy">
                <p>Copyright &copy; 2017 MxsDoc</p>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/bootstrapQ/qiao.js"></script>
<script type="text/javascript" src="js/logon.js"></script>
<script type="text/javascript" src="static/swiper/swiper.min.js"></script>
<script type="text/javascript">	
	var Banner =  (function () {
		var BannerList = [];
		init();
		
		function init()
		{
			console.log("Banner init");
			//第一个默认banner
			var defaultBanner = {
					img: "/DocSystem/web/images/banner.jpg",
					href: null
			};
			BannerList.push(defaultBanner);
			
			//系统支持6个自定义轮播广告
			for( var i = 1 ; i < 7 ; i++ )
			{
				var bannerInfo = {};
				bannerInfo.img = "/DocSystem/web/images/local_banner/" + i + ".jpg";
				bannerInfo.href = null; 
				BannerList.push(bannerInfo);
			}
			
			var serverIP = getQueryString("serverIP");
			
			//获取官网的轮播图设置，并重新设置banner的背景和跳转链接
			$.ajax({
	             url : "http://dw.gofreeteam.com/DocSystem/Manage/getBannerConfig.do",
	             //url : "/DocSystem/Manage/getBannerConfig.do",
	             type : "post",
	             dataType : "json",
	             data : {
	            	 serverIP: serverIP,
	             },
	             success : function (ret) {
	             	if( "ok" == ret.status){
	             		//获取成功
	                	console.log("获取轮播图设置成功 ret:", ret);
	             		var bannerConfigList = ret.data;
	             		if(bannerConfigList)
	             		{
	             			//根据官网的配置来修改banner配置
		             		for(var i=0; i<bannerConfigList.length; i++)
		             		{
		             			var bannerConfig = bannerConfigList[i];
		             			var index = bannerConfig.bannerIndex;
		             			console.log("bannerConfig index:" + index + " img:" + bannerConfig.img);
		             			if(index && index > 0 && index < 7) //1-6
		             			{
		             				var banner = document.getElementById("banner" + index);
		             				BannerList[index].img = bannerConfig.img;
		             				BannerList[index].href = bannerConfig.href;
		             				BannerList[index].openInNewPage = bannerConfig.openInNewPage;
		             				banner.style.backgroundImage = "url("+ bannerConfig.img +")";		             				
		             			}
		             		}
	             		}		             		
	            		return;
		            }
	                else
	                {
	                	console.log("获取轮播图设置失败");
	            		return false;
	                }
	            },
	            error : function () {
                	console.log("获取轮播图设置异常");
		            return false;
	            }
	        });
		}
				
		function onclick(index)
		{
			console.log("Banner onclick index:" + index);
			var bannerInfo = BannerList[index];
			if(bannerInfo)
			{
				var href = bannerInfo.href;
				if(href && href != null)
				{
					console.log("Banner onclick href:" + href + " openInNewPage:" + bannerInfo.openInNewPage);
					if(!bannerInfo.openInNewPage || bannerInfo.openInNewPage != false)
					{
						window.open(href);   //新窗口打开						
					}
					else
					{
						window.location.href = href; //当前窗口打开
					}
				}
			}
		}
		
        return {
            init: function(){
            	init();
            },
            onclick: function(index){
            	onclick(index);
            },
        };		
	})();
</script>	
<script type="text/javascript">	
	pageInit();   

	//页面初始化
    var login_user = "";	//用来保存刚注册的用户、或刚才登录的用户
	var gShareId; //
    function pageInit()
    {
    	console.log("pageInit");
    	//确定当前登录用户是否已登录
    	$.ajax({
            url : "/DocSystem/User/getLoginUser.do",
            type : "post",
            dataType : "json",
            data : {},
            success : function (ret) {
            	console.log("pageInit() getLoginUser:", ret);
                if( "ok" == ret.status )
                {
                	//Get用户信息
   					var user = ret.data;
   					login_user = user;
   					
                	//显示用户信息
                	ShowUserInfo(user);
                	loginBtnCtrl(user);                	
                }
                else 
                {
                	console.log("pageInit() 获取用户信息失败:" + ret.msgInfo);
                    loginBtnCtrl();
                    
                	if(ret.data && ret.data == "needAddFirstAdmin")
                    {
                		showAddFirstAdminUserPanel();
                    }

                }
            },
            error : function () {
            	showErrorMessage("服务器异常:获取用户信息失败");
            }
        });

        var swiper = new Swiper('.swiper-container', {
            spaceBetween: 30,
            centeredSlides: true,
            autoplay: {
                delay: 5000,
                disableOnInteraction: false,
            },
            pagination: {
                el: '.swiper-pagination',
                clickable: true,
            },
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },
        });
    }
    
    function userLogout()
   	{
    	logout();
    	loginBtnCtrl();
   	}
    
    function loginBtnCtrl(user)
    {
    	if(user)
    	{
        	//hide register Btn
        	$('#mobileRegisterBtn').hide();
        	$('#registerBtn').hide();
        	
        	//hide loginBtn
        	$('#mobileLoginBtn').hide();
        	$('#loginBtn').hide();
        	$('#loginBannerBtn').hide();
        	
        	//show logoutBtn
        	$('#logoutBtn').show();
           	$('#mobileLogoutBtn').show();
                           	
        	//显示进入系统按键
        	$('#enterSystemBtn').show();
        	$('#enterSystemLink').show();
    	}
    	else
    	{
        	//show register Btn
        	$('#mobileRegisterBtn').show();
        	$('#registerBtn').show();
        	
        	//hide loginBtn
        	$('#mobileLoginBtn').show();
        	$('#loginBtn').show();
        	$('#loginBannerBtn').show();
        	
        	//show logoutBtn
        	$('#logoutBtn').hide();
           	$('#mobileLogoutBtn').hide();
                           	
        	//显示进入系统按键
        	$('#enterSystemBtn').hide();
        	$('#enterSystemLink').hide();
    	}
    }
	//通用函数接口
	function showErrorMessage($msg) {
    	qiao.bs.alert($msg);
	}
	
	
	function showFeebackPanel()
	{
		console.log("showFeebackPanel");
		var href = "https://gitee.com/RainyGao/DocSys/issues";
		window.open(href);   //新窗口打开	

		/*
		bootstrapQ.dialog({
			url: 'feeback.html',
			title: '意见与反馈',
			msg: '页面正在加载，请稍等...',
			foot: false,
			big: false,
			callback: function(){
				FeebackPageInit();
			},
		});*/
	}
	
	function downloadInstallPackage()
	{
		var href = "https://github.com/RainyGao-GitHub/DocSys/releases";
		window.open(href);   //新窗口打开	
	}

	function 	purchaseLicense()
	{
		var href = "http://dw.gofreeteam.com/DocSystem/web/sales/select.html";
		window.open(href);   //新窗口打开	
	}

</script>	
</body>
</html>